package com.lingnan.pojo.DTO;

import lombok.Data;

@Data
public class ResultDTO<T> {
    private final int code;
    private final String msg;
    private final T data;

    public static <T> ResultDTO<T> success(T data) {
        return new ResultDTO<>(0, "success", data);
    }

    public static ResultDTO<?> success() {
        return new ResultDTO<>(0, "success", null);
    }
}
